package com.group.dao;


import com.group.model.CoinChargeInfo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author Zhangyang Hu
 */
@Repository
public interface CoinDao {

    @Update("update coinchargeinfo set status = 'E' where status = 'N' and cid = #{arg0} and timestamp < #{arg1}")
    public void updateCoinChargeInfo(String cid, Long curTimeStamp);

    @Select("select * from coinchargeinfo where status = 'N' and timestamp < #{arg0}")
    public List<CoinChargeInfo> queryExpired(Long timestamp);
}
